<template>
    <div style="position: relative;">
        <!--tab-control :tabs="tabLists" class="tab"></tab-control-->
        <el-button type="primary" v-if="showButton" @click="addAdviser">新增顾问</el-button>
        <router-view ref="routerView" :showDrawer="showDrawer" v-on:showDrawer="showDrawer=false"></router-view>
    </div>
</template>
<script>
export default {
    data() {
        return {
            tabLists: [],
            showButton: false,
            showDrawer: false
        }
    },
    methods: {
        addAdviser() {
            this.showDrawer = true;
        }
    },
    created() {
        // this.tabLists = this.$route.matched.slice(-2, -1)[0].meta.tabs;
        /*
        let child = this.$store.state.user_info.menus[3].child[3].child;
        for(let [key, value] of Object.entries(child)) {
            this.tabLists.push({label: value.menu_name, name: value.description})
        }
        console.log(this.tabLists)
        //this.tabLists = this.$route.matched.slice(-2, -1)[0].meta.tabs;
        */
    }
};
</script>
<style lang="scss" scoped>
  .el-button {
    position: absolute;
    right: 5px;
    top: -38px;
    z-index:100
  }
</style>